{foreach from=$folders item="folder"}
<li class="expandable"><span class="folder" style="float: left"></span><a href="#">{$folder->name}</a>
{assign var="folds" value=$folder->Folders->get()}
{if $folds|@count > 0}
<ul style="display: none;">{include file="elements/folder.tpl" folders=$folds}</ul>
{/if}
</li>
{/foreach}